import java.util.Scanner;
public class InString {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String str1=sc.nextLine();
        System.out.println("请输入要查找的字符：");
        String str2=sc.nextLine();
        String str[]=str1.split(str2);
        System.out.println(str1+"中出现"+(str.length-1)+str2+"次");

    }
}
